<?php defined('SYSPATH') or die('No direct access allowed.');

class upload extends upload_Core {
	
	/**
	 * Returns a random name for a file
	 * 
	 * @param string $old_name
	 * @return string
	 */
	function random_name($old_name)
	{
		$ext = substr($old_name, strrpos($old_name, '.'));
		mt_srand();
		return md5(uniqid(mt_rand())).$ext;
	}

}

// End of upload helper